<?php 
	$CategoryModel=M('\Common\Model\sc_category');
	$GoodsModel=M('\Common\Model\sc_goods');
	$CateData=$CategoryModel->getIndexCategory();
	$hotData=$GoodsModel->getHot();
	
	

?>
<style type="text/css">
	.naver .active{
	text-decoration: none;
	background-color: #c81118;
}
</style>
<div class="shortcut">
    <div class="layout">
		<div class="s-main">
			<ul>
				{{if value="!isset($_SESSION['info'])"}}
				<li class="s-login" id="unlogin_status">
						<a href="{{U('User/login')}}">登录</a>
						&nbsp;&nbsp;&nbsp;
                        <a href="{{U('User/reg')}}">注册</a>
				</li>
                {{else}}
				<li class="s-user" id="login_status">
					<div class="s-dropdown">
						<div class="h">
							<a href="{{U('User/login')}}">{{($_SESSION['info']['username'])}}</a>
							<a href="" id="customer_name" rel="nofollow" timetype="timestamp" class="link-user"></a>
						&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;<a href="{{U('User/out')}}">退出</a></p>
						</div>
					</div>
				</li>
				<li class="s-myOrders">
					<a href="{{U('Qzone/index')}}" rel="nofollow" timetype="timestamp">我的订单</a>
				</li>
				
				{{endif}}

				<li class="s-hwep hide" id="preferential"></li>
			</ul>
		</div>
    </div>
</div>
<!--头部开始-->
<header class="header">
	<div class="layout">
		<!-- 21030909-logo-start -->
		<div class="logo logo-index"><a href="#" title=""><img src="./Public/Home/image/newLogo.png" alt="Vmall.com - 华为商城"></a></div><!-- 21030909-logo-start -->
		<!-- 20130909-搜索条-焦点为search-form增加className:hover -start -->
	<div class="searchBar">
			<!-- 页头热门搜索 -->
			<div class="searchBar-form" id="searchBar-area">
				<form method="get" onsubmit="return search(this)">					
					<label style="display: block; position: absolute; cursor: text; float: left; z-index: 2; color: rgb(153, 153, 153);" class="text" for="search-kw"></label>
					<input type="text" class="text" maxlength="100" id="search-kw" style="z-index: 1;" autocomplete="off"><input type="submit" class="button" value="搜索">
					<input type="hidden" id="default-search" value="荣耀8">
				</form>
			</div>
			
	<!--热门搜索开始-->	
	<div class="searchBar-key">
	    <b>热门搜索：</b>
		{{foreach from="$hotData" value="$v"}}
		<a href="{{U('Goods/index',['gid'=>$v['gid']])}}" target="_blank">{{mb_substr($v['gname'],0,12)}}</a>
		{{endforeach}}
    </div>
   <!--热门搜索结束-->		
	</div><!-- 20130909-搜索条-end -->
		<!-- 21030910-头部-工具栏-start -->
		<div class="header-toolbar">
			<!-- 21030910-头部-工具栏-焦点为header-toolbar-item增加ClassName:hover -->
			<div class="header-toolbar-item" id="header-toolbar-imall">
			</div>
			<div class="header-toolbar-item" id="header-toolbar-minicart">
				<!-- 21030909-迷你购物车-start -->
				<div class="minicart">
					<div class="h" id="header-toolbar-minicart-h"><a href="{{U('Cart/index')}}" rel="nofollow" timetype="timestamp">我的购物车</a><i></i><s></s><u></u></div>
				</div><!-- 21030909-迷你购物车-end -->
			</div>
		</div><!-- 21030910-头部-工具栏-start -->
	</div>			
</header>
<!--头部结束-->



<!-- 导航 -->
<div class="naver-main">
	<div class="layout">			
<!--分类开始-->
<div class="category" id="category-block">		
	<div class="h">
		<h2>全部商品</h2>
		<i class="icon-category"></i>
	</div>
	<div class="b">
		<ol class="category-list">
             <!-- 左边分类一 -->  
             {{foreach from="$CateData" value="$v"}}  
			<li class="category-item ">
					<div class="category-info">
						<h3><a href="{{U('index',['cid'=>$v['cid']])}}" target="_blank"><span>{{$v['cname']}}</span></a></h3>
						   {{foreach from="$v['secondLimit']" value="$vv"}}
							<a href="{{U('index',['cid'=>$vv['cid']])}}" target="_blank"><span>{{$vv['cname']}}</span></a>
							{{endforeach}}
							
					</div>
					<!--分类一弹出-->
					<div class="category-panels children-col-1">
						<ul class="subcate-list children-col-list">
							{{foreach from="$v['second']" value="$sv"}}
							<li class="subcate-item">
								<a href="{{U('index',['cid'=>$sv['cid']])}}" target="_blank"><span>{{$sv['cname']}}</span></a>
							</li>
							{{endforeach}}
							
							<dl class="category-banner children-col-2">
								<dt><span>推荐商品</span></dt>
									<dd><a href="" target="_blank">以旧换新</a></dd>
									<dd><a href="" target="_blank">华为 Mate 8</a></dd>
									<dd><a href="" target="_blank">荣耀畅玩5X</a></dd>
							</dl>
						</ul>
					</div>
				</li>
				{{endforeach}}
				<!--左边分类弹出部分结束-->
				
		</ol>
	</div>
</div>
<!--分类结束-->
 <!--导航开始-->
    <nav class="naver">
        <ul id="naver-list">
        	<li><a href="index.php" target="_blank"><span>首页</span></a> </li>
        	{{foreach from="$CateData" value="$v"}}
			<li><a href="{{U('index',['cid'=>$v['cid']])}}" target="_blank"><span>{{$v['cname']}}</span></a> </li>
			{{endforeach}}
        </ul>
    </nav>	
	</div>
</div>
	<!--导航结束-->